Skip to content

Add documentation and scripts for comparing builds using UnityDataTool #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

SkowronskiAndrew
Copy link
Collaborator

@SkowronskiAndrew SkowronskiAndrew commented Jun 18, 2025

Comparison of builds is a very common topic when trying to investigate non-determinism or other "unexpected" changes when a project is built. But there is no single "compare builds" tool or feature and UnityDataTools doesn't natively support comparison.

This PR adds two "example" scripts that aid in the comparison of the sqlite database generated by "UnityDataTools analyze".
It also frames the use of these scripts in a new documentation topic that also gets into using diff tools + WebExtract + UnityDataTools.

The two examples try to touch on two common tricky scenarios:

  • AssetBundles built by Addressables with hashes in the name
  • texture changes inside .resS files

@SkowronskiAndrew SkowronskiAndrew requested a review from Copilot June 18, 2025 21:26
Copilot

This comment was marked as outdated.

Add images and more specific text, based on the example where an AssetBundle has changed due to a pixel change within a texture.
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds tooling and documentation for comparing Unity build outputs at both bundle and object levels using UnityDataTool.

  • Introduces a JSON args file for batch commands to dump and analyze Unity data files.
  • Provides two PowerShell scripts (comparebundles.ps1 and comparebuilds.ps1) to compare AssetBundles and build databases.
  • Updates README.md and adds detailed comparison guides under Documentation/.

Reviewed Changes

Copilot reviewed 6 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
UnityDataTool/UnityDataTool.args.json Add template for dumping and analysing Unity data files
Scripts/comparebundles.ps1 New PowerShell script to compare two versions of an AssetBundle
Scripts/comparebuilds.ps1 New PowerShell script to compare two UnityDataTool database outputs
README.md Update intro to reference the new comparing-builds documentation
Documentation/comparing-builds.md Add full guide and examples for comparing builds
Documentation/analyze-examples.md Link to comparing builds example
Comments suppressed due to low confidence (1)

README.md:7

  • [nitpick] This line was converted from a list item to a paragraph, which breaks the markdown list formatting; consider re-adding the leading hyphen or restructuring the list.
The [command line tool](./UnityDataTool/README.md) runs directly on Unity data files, without requiring the Editor to be running.  It covers most functionality of the Unity tools WebExtract and binary2text, with better performance.  And it adds a lot of additional functionality, for example the ability to create a SQLite database for detailed analysis of build content. See [examples](./Documentation/analyze-examples.md) and [comparing builds](./Documentation/comparing-builds.md) for examples of how to use the command line tool.

Also update scripts to match by SerializedFile and not AssetBundle because of the hash in name option from Addressables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant